Categories

Versions

Generate Attributes (In Database) (In-Database Processing)

Synopsis

Generates or overrides one or more columns using database-specific expressions.

Description

This operator allows you to generate new columns, or override existing ones. New columns appear as last columns, overridden ones keep their place in the column list. The Expression Editor Dialog allows you to easily construct the column expressions. It shows you the database-specific built-in functions, columns and constants as well. Note that the operator cannot check the syntax of the expression, you only get an error for a wrong expression during process execution. The function list and function descriptions shown only reflect one particular version of the selected database type, their goal is just to help in building expressions with a UI. Otherwise, your database version may easily offer somewhat different functions or syntax.

When constructing the attribute expressions, you may find the built-in macros like process_start_db and t_db useful. Please check the Nest operator help for more information.

Input

  • example set input

Output

  • example set output

Parameters

  • function_descriptions List of attributes to generate. You can both create new attributes, as well as overwrite existing ones. The second parameter in each row defines the expression that generate the value of the attribute. You can use other attributes, macros and database-specific operators and functions in these expressions. Use brackets ([]) around attributes (columns) that will automatically be replaced by db-specific quote characters to make sure that lowercase/uppercase and special characters are handled properly. Range: list
  • keep_all If set to true, all the original attributes are kept, otherwise they are removed from the example set. Range: boolean
  • replace_square_brackets Replace square brackets. By default square brackets are replaced in function expressions by the database specific characters used for escaping special identifiers (e.g. with backticks(`) for Google BigQuery). In some situations you may not want to replace the square brackets in the expression. Uncheck this parameter to do so. Range: boolean